package genericlistsvsarrays;

/**
 * Created with IntelliJ IDEA.
 * User: gia
 * Date: 30.08.2012
 * Time: 01:35
 *
 */
public class GenericListsVSArrays {

    public static void main(String[] args) {

        failAtCompileTime();

        failAtRuntime();

    }

    private static void failAtRuntime() {

        Object strings[] = new String[1];
        strings[0] = 2;

    }

    private static void failAtCompileTime() {

//        List<Object> stringList = new ArrayList<String>();
//        stringList.add(2);
    }


}
